Class LocalRequestChannel
- java.lang.Object
-
- org.objectweb.joram.client.jms.local.LocalRequestChannel
-
- All Implemented Interfaces:
RequestChannel,LocalRequestChannelMBean
public class LocalRequestChannel extends Object implements RequestChannel, LocalRequestChannelMBean
-
-
Field Summary
Fields Modifier and Type Field Description private DatecreationDateprivate org.objectweb.joram.mom.proxies.StandardConnectionContextctxprivate org.objectweb.joram.shared.security.Identityidentitystatic org.objectweb.util.monolog.api.Loggerloggerloggerprivate FactoryParametersparamsprivate fr.dyade.aaa.agent.AgentIdproxyIdprivate longreceivedCountprivate longsentCount
-
Constructor Summary
Constructors Constructor Description LocalRequestChannel(FactoryParameters params, org.objectweb.joram.shared.security.Identity identity)Creates a local connection channel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the connection and unregisters the MBean.voidclosing()voidconnect()DategetCreationDate()Gets connection creation date.org.objectweb.joram.shared.security.IdentitygetIdentity()private StringgetMBeanName()longgetReceivedCount()Gets the number of replies received on the connection.longgetSentCount()Gets the number of requests sent on the connection.StringgetUserName()Gets connected user's name.org.objectweb.joram.shared.client.AbstractJmsReplyreceive()voidsend(org.objectweb.joram.shared.client.AbstractJmsRequest request)voidsetTimer(Timer timer)
-
-
-
Field Detail
-
logger
public static org.objectweb.util.monolog.api.Logger logger
logger
-
params
private FactoryParameters params
-
identity
private org.objectweb.joram.shared.security.Identity identity
-
proxyId
private fr.dyade.aaa.agent.AgentId proxyId
-
ctx
private org.objectweb.joram.mom.proxies.StandardConnectionContext ctx
-
creationDate
private Date creationDate
-
sentCount
private long sentCount
-
receivedCount
private long receivedCount
-
-
Constructor Detail
-
LocalRequestChannel
public LocalRequestChannel(FactoryParameters params, org.objectweb.joram.shared.security.Identity identity)
Creates a local connection channel.- Parameters:
params- Factory parameters.identity-- Throws:
JMSSecurityException- If the user identification is incorrect.IllegalStateException- If the server is not reachable.
-
-
Method Detail
-
setTimer
public void setTimer(Timer timer)
- Specified by:
setTimerin interfaceRequestChannel
-
connect
public void connect() throws Exception- Specified by:
connectin interfaceRequestChannel- Throws:
Exception
-
getMBeanName
private String getMBeanName()
-
send
public void send(org.objectweb.joram.shared.client.AbstractJmsRequest request) throws Exception- Specified by:
sendin interfaceRequestChannel- Throws:
Exception
-
receive
public org.objectweb.joram.shared.client.AbstractJmsReply receive() throws Exception- Specified by:
receivein interfaceRequestChannel- Throws:
Exception
-
close
public void close()
Description copied from interface:LocalRequestChannelMBeanCloses the connection and unregisters the MBean.- Specified by:
closein interfaceLocalRequestChannelMBean- Specified by:
closein interfaceRequestChannel
-
getCreationDate
public Date getCreationDate()
Description copied from interface:LocalRequestChannelMBeanGets connection creation date.- Specified by:
getCreationDatein interfaceLocalRequestChannelMBean- Returns:
- the date of creation of the connection.
-
getReceivedCount
public long getReceivedCount()
Description copied from interface:LocalRequestChannelMBeanGets the number of replies received on the connection.- Specified by:
getReceivedCountin interfaceLocalRequestChannelMBean- Returns:
- the number of replies received on the connection.
-
getSentCount
public long getSentCount()
Description copied from interface:LocalRequestChannelMBeanGets the number of requests sent on the connection.- Specified by:
getSentCountin interfaceLocalRequestChannelMBean- Returns:
- the number of requests sent on the connection.
-
getUserName
public String getUserName()
Description copied from interface:LocalRequestChannelMBeanGets connected user's name.- Specified by:
getUserNamein interfaceLocalRequestChannelMBean- Returns:
- the name of the connected user.
-
closing
public void closing()
- Specified by:
closingin interfaceRequestChannel
-
getIdentity
public org.objectweb.joram.shared.security.Identity getIdentity()
- Specified by:
getIdentityin interfaceRequestChannel
-
-