|
Platform SDK Java 8.5 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.DuplexChannel
com.genesyslab.platform.commons.protocol.ClientChannel
com.genesyslab.platform.webmedia.protocol.WebmediaChannel
com.genesyslab.platform.webmedia.protocol.OptionalRegistrationChannel
com.genesyslab.platform.webmedia.protocol.BasicChatProtocol
@ProtocolDescription.Tag(sdkName="WebMedia", protocolName="BasicChat") public class BasicChatProtocol
By default, BasicChatProtocol has enabled AutoRegister mode. Set AutoRegister to false if you need send client registration message directly.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.protocol.ClientChannel |
---|
ClientChannel.BasicClientHandshakeStep, ClientChannel.ClientHandshakeStep, ClientChannel.RegistrationHandler, ClientChannel.SimpleRegistrationHandler |
Nested classes/interfaces inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel |
---|
AbstractChannel.AsyncErrorNotifier |
Field Summary |
---|
Fields inherited from class com.genesyslab.platform.webmedia.protocol.WebmediaChannel |
---|
OPTION_NAME_ILLEGAL_UNICODE_CHARS_REPLACEMENT, OPTION_NAME_REPLACE_ILLEGAL_UNICODE_CHARS, OPTION_NAME_TARGET_XML_VERSION |
Fields inherited from class com.genesyslab.platform.commons.protocol.DuplexChannel |
---|
messageFilter |
Fields inherited from interface com.genesyslab.platform.commons.protocol.Receiver |
---|
DEF_INPUT_SIZE |
Fields inherited from interface com.genesyslab.platform.commons.protocol.Channel |
---|
DEFAULT_TIMEOUT, INFINITE_TIMEOUT |
Constructor Summary | |
---|---|
BasicChatProtocol()
Creates instance of BasicChatProtocol. |
|
BasicChatProtocol(Endpoint endpoint)
Creates instance of BasicChatProtocol. |
|
BasicChatProtocol(Endpoint endpoint,
long timeout)
Creates instance of BasicChatProtocol. |
Method Summary | |
---|---|
protected com.genesyslab.platform.commons.connection.impl.xml.ProtocolDialect |
getDialect()
|
protected ClientChannel.ClientHandshakeStep |
getHandshakeStart()
This virtual method returns initial handshake step for this channel. |
java.lang.String |
getPersonId()
|
java.lang.String |
getSecureKey()
Optional, if set with UserId, channel will use it to restore previously registered session. |
BasicChatServerContext |
getServerContext()
|
int |
getTimeZoneOffset()
Optional, timezone offset. |
KeyValueCollection |
getUserData()
Optional, used for user identification in UCS (Universal Contact Server). |
java.lang.String |
getUserId()
|
java.lang.String |
getUserNickname()
|
UserType |
getUserType()
|
boolean |
isAutoRegister()
Returns flag for automatic client registration request on connection open. By default it is enabled, but sometimes it may be required to do some other operations before client registration request, or there is a need to create custom registration request. In this case user may disable automatic registration and later (after the connection opened) send own registration request. |
protected void |
onClose(ConnectionClosedEvent event)
|
protected void |
onEventRegistered(EventRegistered event)
This method is called on successful response to the client Auto-Registration request. |
protected void |
onOpen()
This method is called when channel is opened and just about to call event handler. |
protected void |
onSend(Message message)
Gives to subclass a chance to modify message before sending it to remote party. |
void |
setAutoRegister(boolean autoRegister)
Sets flag for automatic client registration request on connection open. By default it is enabled, but sometimes it may be required to do some other operations before client registration request, or there is a need to create custom registration request. In this case user may disable automatic registration and later (after the connection opened) send own registration request. |
void |
setPersonId(java.lang.String personId)
|
void |
setSecureKey(java.lang.String secureKey)
Optional, if set with UserId, channel will use it to restore previously registered session. |
void |
setTimeZoneOffset(int timeZoneOffset)
Optional, timezone offset. |
void |
setUserData(KeyValueCollection userData)
Optional, used for user identification in UCS (Universal Contact Server). |
void |
setUserId(java.lang.String userId)
|
void |
setUserNickname(java.lang.String userNickname)
|
void |
setUserType(UserType userType)
|
Methods inherited from class com.genesyslab.platform.webmedia.protocol.WebmediaChannel |
---|
applyConfiguration, createConnection, lookupConnectionParameter |
Methods inherited from class com.genesyslab.platform.commons.protocol.AbstractChannel |
---|
addChannelListener, configure, connectionContext, copyTLSSettings, fireClosed, fireErrorEvent, fireErrorEvent, generateChannelId, getChannelId, getConfiguration, getDefaultInvoker, getEndpoint, getListenerHelper, getState, getStateMods, getTimeout, internal, onSetEndpoint, releaseDefaultInvoker, removeChannelListener, setConfiguration, setInvoker, setServerContext, setState, setTimeout, throwNotClosed, throwNotOpened, throwNotOpenedOnClose, throwNotOpenedOnSend, throwNull, throwNullEndpoint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Protocol |
---|
getProtocolId |
Methods inherited from interface com.genesyslab.platform.commons.protocol.InputChannel |
---|
setMessageHandler |
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiver |
---|
receive, receive |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Receiver |
---|
clearInput, getInputSize, releaseReceivers, setInputSize |
Methods inherited from interface com.genesyslab.platform.commons.protocol.OutputChannel |
---|
addListener, removeListener, send |
Methods inherited from interface com.genesyslab.platform.commons.protocol.Channel |
---|
close, getTimeout, open, 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.InterceptorSupport |
---|
getInterceptor |
Methods inherited from interface com.genesyslab.platform.commons.protocol.MessageReceiverManagement |
---|
setReceiver |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ReceiverManagement |
---|
resetReceiver |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConfigurationSupport |
---|
configure, getConfiguration |
Methods inherited from interface com.genesyslab.platform.commons.protocol.EndpointSupport |
---|
getEndpoint |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ProtocolDescriptionSupport |
---|
getProtocolDescription |
Methods inherited from interface com.genesyslab.platform.commons.protocol.AsyncInvokerSupport |
---|
setInvoker |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ConnectionInvokerSupport |
---|
setConnectionInvoker |
Constructor Detail |
---|
public BasicChatProtocol(Endpoint endpoint, long timeout)
endpoint
- Parameters of the connection to createtimeout
- Timeout to wait for message (in milliseconds)public BasicChatProtocol(Endpoint endpoint)
endpoint
- Parameters of the connection to createpublic BasicChatProtocol()
Method Detail |
---|
public int getTimeZoneOffset()
getTimeZoneOffset
in interface BasicChatProtocolHandshakeOptions
public void setTimeZoneOffset(int timeZoneOffset)
setTimeZoneOffset
in interface BasicChatProtocolHandshakeOptions
timeZoneOffset
- timezone offsetpublic KeyValueCollection getUserData()
getUserData
in interface BasicChatProtocolHandshakeOptions
public void setUserData(KeyValueCollection userData)
setUserData
in interface BasicChatProtocolHandshakeOptions
userData
- user datapublic java.lang.String getUserNickname()
getUserNickname
in interface BasicChatProtocolHandshakeOptions
public void setUserNickname(java.lang.String userNickname)
setUserNickname
in interface BasicChatProtocolHandshakeOptions
public UserType getUserType()
getUserType
in interface BasicChatProtocolHandshakeOptions
public void setUserType(UserType userType)
setUserType
in interface BasicChatProtocolHandshakeOptions
public java.lang.String getPersonId()
getPersonId
in interface BasicChatProtocolHandshakeOptions
public void setPersonId(java.lang.String personId)
setPersonId
in interface BasicChatProtocolHandshakeOptions
public java.lang.String getUserId()
getUserId
in interface BasicChatProtocolHandshakeOptions
public void setUserId(java.lang.String userId)
setUserId
in interface BasicChatProtocolHandshakeOptions
public java.lang.String getSecureKey()
getSecureKey
in interface BasicChatProtocolHandshakeOptions
public void setSecureKey(java.lang.String secureKey)
setSecureKey
in interface BasicChatProtocolHandshakeOptions
secureKey
- secure keypublic boolean isAutoRegister()
isAutoRegister
in interface BasicChatProtocolHandshakeOptions
isAutoRegister
in class OptionalRegistrationChannel
setAutoRegister(boolean)
,
RequestRegister
public void setAutoRegister(boolean autoRegister)
setAutoRegister
in interface BasicChatProtocolHandshakeOptions
setAutoRegister
in class OptionalRegistrationChannel
autoRegister
- flag for automatic client registration request allowingRequestRegister
public BasicChatServerContext getServerContext()
getServerContext
in class AbstractChannel
protected void onSend(Message message) throws ProtocolException
DuplexChannel
onSend
in class ClientChannel
message
- Message to modify
ProtocolException
- In the case of an unrecoverable protocol error. Client applications should not
try to deal with these exceptions, except for logging or displaying to users or technical administrators.
Check the exception cause for more details.protected void onOpen() throws ProtocolException
DuplexChannel
onOpen
in class OptionalRegistrationChannel
ProtocolException
- if there are problems during
post open operations (e.g. registration)protected void onClose(ConnectionClosedEvent event)
onClose
in class DuplexChannel
protected void onEventRegistered(EventRegistered event)
protected com.genesyslab.platform.commons.connection.impl.xml.ProtocolDialect getDialect()
getDialect
in class WebmediaChannel
protected ClientChannel.ClientHandshakeStep getHandshakeStart()
OptionalRegistrationChannel
getHandshakeStart
in class OptionalRegistrationChannel
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |