|
Configuration Platform SDK 7.6 API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.protocol.AbstractChannel
com.genesyslab.platform.commons.protocol.ServerChannel
This channel accepts connection on some Endpoint.
Method addChannelListener
accepts ServerChannelListener,
which defines on additional method.
When connection is established
onClientChannelOpened
method is notified.
Field Summary |
Fields inherited from interface com.genesyslab.platform.commons.protocol.Channel |
DEFAULT_TIMEOUT, INFINITE_TIMEOUT |
Fields inherited from interface com.genesyslab.platform.commons.protocol.Receiver |
DEF_INPUT_SIZE |
Constructor Summary | |
ServerChannel(Endpoint endpoint,
long timeout,
ProtocolFactory protocolFactory)
|
|
ServerChannel(Endpoint endpoint,
ProtocolFactory protocolFactory)
|
Method Summary | |
void |
beginClose()
Method is asynchronous. |
void |
beginOpen()
Method is asynchronous. |
void |
clearInput()
Clears input of the receiver. |
void |
close()
|
void |
close(long timeout)
|
void |
closeClientChannels()
|
void |
configure(ConnectionConfiguration config)
Set Configuration for all new channels. |
java.util.Collection |
getChannels()
|
int |
getInputSize()
Return the amount of messages this Receiver can hold before start to "forget stale messages" |
ProtocolDescription |
getProtocolDescription()
|
void |
open()
|
void |
open(long timeout)
|
Message |
receive()
|
Message |
receive(long timeout)
|
RequestContext |
receiveRequest()
Receive request from the client. |
RequestContext |
receiveRequest(long timeout)
Receive request from the client. |
void |
releaseReceivers()
Notify receivers (threads waiting on receive() methods) they should stop waiting and return null. |
void |
resetReceiver()
|
void |
send(Message message)
Send message to remote party. |
void |
sendToChannelsExcept(Message message,
OutputChannel except)
Send message to all channels except the one. |
void |
setInputSize(int inputSize)
Set the amount of messages this Receiver can hold before start to "forget stale messages" |
void |
setReceiver(RequestReceiverSupport receiver)
|
Methods inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel |
addChannelListener, getConfiguration, getEndpoint, getState, getTimeout, removeChannelListener, setConnectionInvoker, setEndpoint, setInvoker, setTimeout |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Channel |
getTimeout, setTimeout |
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncChannel |
getState |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ChannelListenerSupport |
addChannelListener, removeChannelListener |
Methods inherited from interface com.genesyslab.platform.commons.protocol.EndpointSupport |
getEndpoint, setEndpoint |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConfigurationSupport |
getConfiguration |
Constructor Detail |
public ServerChannel(Endpoint endpoint, ProtocolFactory protocolFactory)
public ServerChannel(Endpoint endpoint, long timeout, ProtocolFactory protocolFactory)
Method Detail |
public void open() throws ProtocolException, java.lang.InterruptedException, java.lang.IllegalStateException
open
in interface Channel
ProtocolException
java.lang.InterruptedException
java.lang.IllegalStateException
public void open(long timeout) throws ProtocolException, java.lang.InterruptedException, java.lang.IllegalStateException
open
in interface Channel
ProtocolException
java.lang.InterruptedException
java.lang.IllegalStateException
public void close() throws ProtocolException, java.lang.InterruptedException, java.lang.IllegalStateException
close
in interface Channel
ProtocolException
java.lang.InterruptedException
java.lang.IllegalStateException
public void close(long timeout) throws ProtocolException, java.lang.InterruptedException, java.lang.IllegalStateException
close
in interface Channel
ProtocolException
java.lang.InterruptedException
java.lang.IllegalStateException
public void closeClientChannels() throws java.lang.InterruptedException
java.lang.InterruptedException
public void send(Message message) throws ProtocolException
OutputChannel
send
in interface OutputChannel
message
- Message to send
ProtocolException
- some generic problemspublic void sendToChannelsExcept(Message message, OutputChannel except) throws ProtocolException
message
- Message to sendexcept
- channel to miss from sending
ProtocolException
- if exception occured during sendingpublic void beginOpen() throws ProtocolException
AsyncChannel
beginOpen
in interface AsyncChannel
ProtocolException
- in case of problems establishing connectionpublic void beginClose()
AsyncChannel
beginClose
in interface AsyncChannel
public RequestContext receiveRequest() throws java.lang.InterruptedException
RequestReceiver
receiveRequest
in interface ResponseChannel
java.lang.InterruptedException
public RequestContext receiveRequest(long timeout) throws java.lang.InterruptedException
RequestReceiver
Channel
description for timeout values meaning.
receiveRequest
in interface ResponseChannel
java.lang.InterruptedException
public java.util.Collection getChannels()
public ProtocolDescription getProtocolDescription()
getProtocolDescription
in interface ProtocolDescriptionSupport
public Message receive() throws java.lang.InterruptedException, java.lang.IllegalStateException
java.lang.InterruptedException
java.lang.IllegalStateException
public Message receive(long timeout) throws java.lang.InterruptedException, java.lang.IllegalStateException
java.lang.InterruptedException
java.lang.IllegalStateException
public void clearInput()
Receiver
clearInput
in interface Receiver
public int getInputSize()
Receiver
getInputSize
in interface Receiver
public void setInputSize(int inputSize)
Receiver
setInputSize
in interface Receiver
inputSize
- maximum count of messages stored in receiverpublic void releaseReceivers()
Receiver
releaseReceivers
in interface Receiver
public void configure(ConnectionConfiguration config)
getConfiguration() method
can be different
configure
in interface ConfigurationSupport
configure
in class AbstractChannel
config
- connection configuration objectpublic void setReceiver(RequestReceiverSupport receiver)
setReceiver
in interface RequestReceiverManagement
public void resetReceiver()
resetReceiver
in interface ReceiverManagement
|
Configuration Platform SDK 7.6 API Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |