|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openorb.iiop.IIOPTransport
Interface for creating sockets.
Constructor Summary | |
IIOPTransport(java.net.InetAddress host,
int port,
org.apache.avalon.framework.logger.Logger logger)
|
|
IIOPTransport(java.net.InetAddress host,
int port,
org.apache.avalon.framework.logger.Logger logger,
boolean socketNoDelay,
boolean boostRecvPriority,
int sendBufferSize,
int receiveBufferSize,
int bufferedOutputStreamSize)
Constructor. |
|
IIOPTransport(java.net.Socket sock,
int serverPort,
org.apache.avalon.framework.logger.Logger logger)
|
|
IIOPTransport(java.net.Socket sock,
int serverPort,
org.apache.avalon.framework.logger.Logger logger,
boolean socketNoDelay,
boolean boostRecvPriority,
int sendBufferSize,
int receiveBufferSize,
int bufferedOutputStreamSize)
Constructor. |
Method Summary | |
void |
close()
Close the connection this always succeeds. |
boolean |
establishAssociation(Address addr,
TransportAssociationHolder binding)
Check for applicability of channel for carrying messages for the specified address and setup any client transport binding. |
boolean |
isMessageError()
Returns true if setMessageError has been called. |
boolean |
isOpen()
Is is the transport open? |
void |
open()
Open the connection. |
StorageBuffer |
recvMessage(int timeout,
TransportAssociationHolder assoc)
Read next message. |
void |
sendMessage(StorageBuffer msg,
java.lang.Object assoc)
Write message to comms protocol. |
void |
setMessageError()
If this gets called then the close operation will close by sending a MessageError message. |
java.lang.String |
toString()
Print out socket information. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IIOPTransport(java.net.InetAddress host, int port, org.apache.avalon.framework.logger.Logger logger)
public IIOPTransport(java.net.InetAddress host, int port, org.apache.avalon.framework.logger.Logger logger, boolean socketNoDelay, boolean boostRecvPriority, int sendBufferSize, int receiveBufferSize, int bufferedOutputStreamSize)
host
- Host of the endpoint.port
- Port of the endoint.public IIOPTransport(java.net.Socket sock, int serverPort, org.apache.avalon.framework.logger.Logger logger)
public IIOPTransport(java.net.Socket sock, int serverPort, org.apache.avalon.framework.logger.Logger logger, boolean socketNoDelay, boolean boostRecvPriority, int sendBufferSize, int receiveBufferSize, int bufferedOutputStreamSize)
socket
- Client socket.serverport
- Port of the endoint.Method Detail |
public void open()
open
in interface Transport
org.openorb.net.Transport
COMM_FAILURE
- failed to open channel. This exception
will be reported to clients.public void close()
close
in interface Transport
public boolean isOpen()
isOpen
in interface Transport
public void sendMessage(StorageBuffer msg, java.lang.Object assoc)
sendMessage
in interface Transport
msg
- The message to be sent.assoc
- contains whatever was associated with the ClientBinding
in the establishBinding operation or with the ServerRequest in the
recvMessage operation.COMM_FAILURE
- permanent transport failure occoured.
Cleanup and then call close.public StorageBuffer recvMessage(int timeout, TransportAssociationHolder assoc) throws java.io.EOFException
recvMessage
in interface Transport
timeout
- max time to wait before recieving a message.assoc
- (out) will be set to contain the transport association for the
message. This will be passed back to sendMessage when a reply is sent
for server requests. For client replies the contents will be
compared to the ClientBinding's association, if they don't match some
action will be taken.java.io.EOFException
- end of file has been reached. Cleanup and call close.COMM_FAILURE
- permanent transport failure occoured.
Cleanup and then call close.public void setMessageError()
public boolean isMessageError()
public boolean establishAssociation(Address addr, TransportAssociationHolder binding)
establishAssociation
in interface Transport
addr
- the address.assoc
- (out) will be set to contain the transport association for
the client binding. This will be passed back to sendMessage when a
request is sent.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |