com.sun.jmx.remote.generic
Class ServerSynchroMessageConnectionImpl

java.lang.Object
  extended by com.sun.jmx.remote.generic.ServerSynchroMessageConnectionImpl
All Implemented Interfaces:
ServerSynchroMessageConnection, SynchroMessageConnection

public class ServerSynchroMessageConnectionImpl
extends Object
implements ServerSynchroMessageConnection


Constructor Summary
ServerSynchroMessageConnectionImpl(MessageConnection mc, Map env)
           
 
Method Summary
 void close()
          Closes this connection.
 void connect(Map env)
          Establish the connection.
 MessageConnection getAsynchroConnection()
          Returns the underlying asynchronous trasport.
 String getConnectionId()
          Returns this connection identifier.
 Subject getSubject()
          Returns a connection-specific subject used for authorization.
 void sendOneWay(Message msg)
          Sends a message to the remote side and does not need a response.
 void setCallback(SynchroCallback cb)
          Sets a callback to receive a remote request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerSynchroMessageConnectionImpl

public ServerSynchroMessageConnectionImpl(MessageConnection mc,
                                          Map env)
                                   throws IOException
Throws:
IOException
Method Detail

connect

public void connect(Map env)
             throws IOException
Description copied from interface: SynchroMessageConnection

Establish the connection. This method must be called before any other method of this interface. The behavior is unspecified if not.

Specified by:
connect in interface SynchroMessageConnection
Parameters:
env - the properties of the connection.
Throws:
IOException - if the connection cannot be made.

sendOneWay

public void sendOneWay(Message msg)
                throws IOException
Description copied from interface: SynchroMessageConnection
Sends a message to the remote side and does not need a response. This method can be implemented in different ways:

1) sends out the message and gets return at once. For example, if the underlying protocol is asynchronous.

2) sends out the message and is blocked until arrival of a response. For example, if the underlying protocol supports only synchronous communication.

3) throws UnsupportedOperationException to tell the caller that it is not supported by the implementation. For example, if the object is used on a server side and it is not mandatory for the server to send a request spontaneously.

Specified by:
sendOneWay in interface SynchroMessageConnection
Throws:
IOException - if a message could not be sent because of a communication problem.

setCallback

public void setCallback(SynchroCallback cb)
Description copied from interface: ServerSynchroMessageConnection
Sets a callback to receive a remote request.

Specified by:
setCallback in interface ServerSynchroMessageConnection
Parameters:
cb - a callback used to treat a remote request.

getConnectionId

public String getConnectionId()
Description copied from interface: SynchroMessageConnection
Returns this connection identifier.

Specified by:
getConnectionId in interface SynchroMessageConnection

close

public void close()
           throws IOException
Description copied from interface: SynchroMessageConnection
Closes this connection.

Specified by:
close in interface SynchroMessageConnection
Throws:
IOException

getAsynchroConnection

public MessageConnection getAsynchroConnection()
Returns the underlying asynchronous trasport.


getSubject

public Subject getSubject()
Description copied from interface: ServerSynchroMessageConnection
Returns a connection-specific subject used for authorization.

Specified by:
getSubject in interface ServerSynchroMessageConnection


Copyright © 2014 Terracotta, Inc.. All rights reserved.