|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.io.messaging.Context
public final class Context
Represents an object that contains references for resources required to create and maintain a sender destination
(BlockingSenderDestination
, NonBlockingSenderDestination
, FireAndForgetDestination
). Every sender
destination is associated with some context. The same context can be shared between different destinations if they
share a connection factory, a credentials collector, or both. When using transport protocols other than HTTP,
or different authentication mechanisms, there may be more shared information.
It is important to use the same Context
for all related Destination
objects
to minimize unnecessary connections, authentication attempts, and so on.
Constructor Summary | ||
---|---|---|
Context(String name)
Creates a Context object. |
||
Context(String name,
CredentialsCollector credentialsCollector)
Creates a Context object. |
||
Context(String name,
ConnectionFactory connectionFactory)
Creates a Context object. |
||
Context(String name,
ConnectionFactory connectionFactory,
CredentialsCollector credentialsCollector)
Creates a Context object. |
Method Summary | ||
---|---|---|
ConnectionFactory |
getConnectionFactory()
Returns the ConnectionFactory for this Context . |
|
CredentialsCollector |
getCredentialsCollector()
Returns the CredentialsCollector for this Context . |
|
String |
getName()
Returns the name of the context. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Context(String name)
Context
object. The connection factory specified will be used for all destinations
associated with a given context.
name
- The name of the context. A destination should be associated with a given context by providing the
context's name in one of createXXXSenderDestination() methods of DestinationFactory
.public Context(String name, CredentialsCollector credentialsCollector)
Context
object. The connection factory specified will be used for all destinations
associated with a given context.
name
- The name of the context. A destination should be associated with a given context by providing the
context's name in one of createXXXSenderDestination() methods of DestinationFactory
.credentialsCollector
- Provides credential information used for sending messages to destinations
that require some form of authentication, such as URLs.public Context(String name, ConnectionFactory connectionFactory)
Context
object. The connection factory specified will be used for all destinations
associated with a given context.
name
- The name of the context. A destination should be associated with a given context by providing the
context's name in one of createXXXSenderDestination() methods of DestinationFactory
.connectionFactory
- Manages connections required for sending messages to destinations.public Context(String name, ConnectionFactory connectionFactory, CredentialsCollector credentialsCollector)
Context
object. The connection factory specified will be used for all destinations
associated with a given context.
name
- The name of the context. A destination should be associated with a given context by providing the
context's name in one of createXXXSenderDestination() methods of DestinationFactory
.connectionFactory
- Manages connections required for sending messages to destinations.credentialsCollector
- Provides credential information used for sending messages to destinations
that require some form of authentication, such as URLs.Method Detail |
---|
public String getName()
public ConnectionFactory getConnectionFactory()
ConnectionFactory
for this Context
.
ConnectionFactory
.public CredentialsCollector getCredentialsCollector()
CredentialsCollector
for this Context
.
CredentialsCollector
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.