org.zeromq.jzmq
Class ManagedSocket

java.lang.Object
  extended by org.zeromq.jzmq.ManagedSocket
All Implemented Interfaces:
Closeable, Receivable<byte[]>, Sendable, Socket

public class ManagedSocket
extends Object
implements Socket

Managed JZMQ Socket


Constructor Summary
ManagedSocket(ManagedContext managedContext, SocketBuilder builder)
           
 
Method Summary
 void close()
           
 Context getContext()
           
 org.zeromq.ZMQ.Socket getZMQSocket()
           
 boolean isActive()
           
 byte[] receive()
           
 byte[] receive(ReceiveFlag flag)
           
 void send(byte[] buf)
           
 void send(byte[] buf, int offset, SendFlag flag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedSocket

public ManagedSocket(ManagedContext managedContext,
                     SocketBuilder builder)
Method Detail

getZMQSocket

public org.zeromq.ZMQ.Socket getZMQSocket()
Specified by:
getZMQSocket in interface Socket

isActive

public boolean isActive()
Specified by:
isActive in interface Socket

receive

public byte[] receive()
               throws Exception
Specified by:
receive in interface Receivable<byte[]>
Throws:
Exception

receive

public byte[] receive(ReceiveFlag flag)
               throws Exception
Specified by:
receive in interface Receivable<byte[]>
Throws:
Exception

send

public void send(byte[] buf)
          throws Exception
Specified by:
send in interface Sendable
Throws:
Exception

send

public void send(byte[] buf,
                 int offset,
                 SendFlag flag)
          throws Exception
Specified by:
send in interface Sendable
Throws:
Exception

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

getContext

public Context getContext()
Specified by:
getContext in interface Socket


Copyright © 2013. All Rights Reserved.