public class LocalRequestChannel extends Object implements RequestChannel, LocalRequestChannelMBean
Modifier and Type | Field and Description |
---|---|
private Date |
creationDate |
private StandardConnectionContext |
ctx |
private Identity |
identity |
static Logger |
logger
logger
|
private FactoryParameters |
params |
private AgentId |
proxyId |
private long |
receivedCount |
private long |
sentCount |
Constructor and Description |
---|
LocalRequestChannel(FactoryParameters params,
Identity identity)
Creates a local connection channel.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the connection and unregisters the MBean.
|
void |
closing() |
void |
connect() |
Date |
getCreationDate()
Gets connection creation date.
|
Identity |
getIdentity() |
private String |
getMBeanName() |
long |
getReceivedCount()
Gets the number of replies received on the connection.
|
long |
getSentCount()
Gets the number of requests sent on the connection.
|
String |
getUserName()
Gets connected user's name.
|
AbstractJmsReply |
receive() |
void |
send(AbstractJmsRequest request) |
void |
setTimer(Timer timer) |
public static Logger logger
private FactoryParameters params
private Identity identity
private AgentId proxyId
private StandardConnectionContext ctx
private Date creationDate
private long sentCount
private long receivedCount
public LocalRequestChannel(FactoryParameters params, Identity identity)
params
- Factory parameters.identity
- jakarta.jms.JMSSecurityException
- If the user identification is incorrect.jakarta.jms.IllegalStateException
- If the server is not reachable.public void setTimer(Timer timer)
setTimer
in interface RequestChannel
public void connect() throws Exception
connect
in interface RequestChannel
Exception
private String getMBeanName()
public void send(AbstractJmsRequest request) throws Exception
send
in interface RequestChannel
Exception
public AbstractJmsReply receive() throws Exception
receive
in interface RequestChannel
Exception
public void close()
LocalRequestChannelMBean
close
in interface RequestChannel
close
in interface LocalRequestChannelMBean
public Date getCreationDate()
LocalRequestChannelMBean
getCreationDate
in interface LocalRequestChannelMBean
public long getReceivedCount()
LocalRequestChannelMBean
getReceivedCount
in interface LocalRequestChannelMBean
public long getSentCount()
LocalRequestChannelMBean
getSentCount
in interface LocalRequestChannelMBean
public String getUserName()
LocalRequestChannelMBean
getUserName
in interface LocalRequestChannelMBean
public void closing()
closing
in interface RequestChannel
public Identity getIdentity()
getIdentity
in interface RequestChannel
Copyright © 2023 ScalAgent D.T.. All rights reserved.