Class JMSRequestEndpoint
- java.lang.Object
-
- com.levigo.jadice.server.jms.core.JMSRequestEndpoint
-
- All Implemented Interfaces:
RequestEndpoint<JMSJobExecutionContext>
,org.springframework.context.Lifecycle
,org.springframework.jmx.export.naming.SelfNaming
@ManagedResource(description="JMS request endpoint") public class JMSRequestEndpoint extends Object implements RequestEndpoint<JMSJobExecutionContext>, org.springframework.context.Lifecycle, org.springframework.jmx.export.naming.SelfNaming
The JMS specific implementation of aRequestEndpoint
.- Since:
- jadice server 5.5.0.0
-
-
Constructor Summary
Constructors Constructor Description JMSRequestEndpoint()
-
Method Summary
-
-
-
Method Detail
-
poll
public JMSJobExecutionContext poll() throws Exception
Description copied from interface:RequestEndpoint
Poll for a new incoming job request which is wrapped by aJobExecutionContext
- Specified by:
poll
in interfaceRequestEndpoint<JMSJobExecutionContext>
- Returns:
- A new
RequestEndpoint
ornull
if no new request is pending - Throws:
Exception
- in case of an error during polling
-
start
@ManagedOperation(description="Starts this JMS request endpoint") public void start()
- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
stop
@ManagedOperation(description="Stops this JMS request endpoint") public void stop()
- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
-
isRunning
@ManagedAttribute(description="Checks if the JMS request endpoint is running") public boolean isRunning()
- Specified by:
isRunning
in interfaceorg.springframework.context.Lifecycle
-
getConnectionFactory
public javax.jms.QueueConnectionFactory getConnectionFactory()
-
setConnectionFactory
public void setConnectionFactory(javax.jms.QueueConnectionFactory factory)
-
getWrappedConnectionFactory
public javax.jms.QueueConnectionFactory getWrappedConnectionFactory()
Return a connection factory which delegates to the connection factory set bysetConnectionFactory(QueueConnectionFactory)
, but uses the credentials set viasetJmsUsername(String)
/setJmsPassword(String)
.- Returns:
- a
QueueConnectionFactory
that uses credentials as described above. - See Also:
setJmsUsername(String)
,setJmsPassword(String)
-
getRequestQueueName
@ManagedAttribute(description="The queue name this jadice server instance is listening on") public String getRequestQueueName()
-
setRequestQueueName
public void setRequestQueueName(String queueName)
-
getStreamTransportFactory
public StreamTransportFactory getStreamTransportFactory()
-
setStreamTransportFactory
public void setStreamTransportFactory(StreamTransportFactory transport)
-
getJmsPassword
public String getJmsPassword()
-
getJmsUsername
public String getJmsUsername()
-
setJmsPassword
public void setJmsPassword(String jmsPassword)
-
setJmsUsername
public void setJmsUsername(String jmsUsername)
-
getScheduler
public JobScheduler getScheduler()
-
setScheduler
public void setScheduler(JobScheduler scheduler)
-
getObjectName
public ObjectName getObjectName() throws MalformedObjectNameException
- Specified by:
getObjectName
in interfaceorg.springframework.jmx.export.naming.SelfNaming
- Throws:
MalformedObjectNameException
-
setKeepAliveMsgPriority
public void setKeepAliveMsgPriority(int keepAliveMsgPriority)
-
getKeepAliveMsgPriority
public int getKeepAliveMsgPriority()
-
-