public final class TopicServerImpl extends SOMServerImpl implements TopicServer
SOMServerImpl.Descriptor
DEFAULT_KEEP_ALIVE, DEFAULT_KEEP_ALIVE_PROPERTY, KEEP_ALIVE_PROPERTY, READ_ROLE, READ_ROLE_PROPERTY, WRITE_ROLE, WRITE_ROLE_PROPERTY
BINDING_PROPERTY, DEFAULT_QUEUE_BINDING_PREFIX, DEFAULT_TOPIC_BINDING_PREFIX, NAME_PROPERTY
Constructor and Description |
---|
TopicServerImpl(Optional<SessionSecurityContext> securityContext)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the sessions.
|
PublisherSession |
createPublisherSession(UUID uuid,
String clientName)
Creates a publisher session.
|
PublisherWrapper |
createPublisherWrapper()
Creates a publisher wrapper.
|
SubscriberSession |
createSubscriberSession(UUID uuid,
String clientName)
Creates a subscriber session.
|
SubscriberWrapper |
createSubscriberWrapper()
Creates a subscriber wrapper.
|
TopicInfo |
getInfo()
Gets the topic info.
|
protected Session |
newSession(Session.ConnectionMode connectionMode,
Optional<RMIClientSocketFactory> clientSocketFactory,
Optional<RMIServerSocketFactory> serverSocketFactory,
Object reference)
Returns a new session
|
boolean |
removeSession(SessionImpl session)
Removes a session from the set.
|
boolean |
setUp(Config config,
KeyedGroups topicProperties)
Sets up this server.
|
void |
tearDown()
Tears down what has been set up.
|
bind, fillRolesMap, getKeepAlive, getName, getURI, setUp, setUp, stop, toString
addSession, createSecurityContext, createSession, createSession, equals, export, getConfig, getMappedRoles, getRealm, getSessionCount, getSessions, getThisLogger, hashCode, hasRolesMap, hasSecurityContext, isClosed, mapRoles, unexport
getKeepAlive, getName
public TopicServerImpl(@Nonnull Optional<SessionSecurityContext> securityContext)
securityContext
- The optional security context.public void close()
close
in class SessionFactoryImpl
public PublisherSession createPublisherSession(UUID uuid, String clientName) throws SessionException
createPublisherSession
in interface TopicServer
uuid
- A UUID used to locate the RMI client instance.clientName
- A descriptive name for the client.SessionException
- When the session creation fails.@Nonnull @CheckReturnValue public PublisherWrapper createPublisherWrapper()
public SubscriberSession createSubscriberSession(UUID uuid, String clientName) throws SessionException
createSubscriberSession
in interface TopicServer
uuid
- A UUID used to locate the RMI client instance.clientName
- A descriptive name for the client.SessionException
- When the session creation fails.@Nonnull @CheckReturnValue public SubscriberWrapper createSubscriberWrapper()
public TopicInfo getInfo()
getInfo
in interface TopicServer
public boolean removeSession(SessionImpl session)
removeSession
in interface SessionFactory
removeSession
in class SOMServerImpl
session
- The session.public boolean setUp(Config config, KeyedGroups topicProperties)
setUp
in class SOMServerImpl
config
- The configuration.topicProperties
- The queue properties.public void tearDown()
tearDown
in class SOMServerImpl
protected Session newSession(Session.ConnectionMode connectionMode, Optional<RMIClientSocketFactory> clientSocketFactory, Optional<RMIServerSocketFactory> serverSocketFactory, Object reference)
newSession
in class SessionFactoryImpl
connectionMode
- The connection mode.clientSocketFactory
- The optional client socket factory.serverSocketFactory
- The optional server socket factory.reference
- A reference object.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.