Project JXTA

net.jxta.impl.endpoint.cbjx
Class CbJxTransport

java.lang.Object
  extended by net.jxta.impl.endpoint.cbjx.CbJxTransport
All Implemented Interfaces:
EndpointListener, MessageReceiver, MessageSender, MessageTransport, Module

public class CbJxTransport
extends Object
implements Module, MessageSender, MessageReceiver, EndpointListener

A JXTA MessageTransport implementation which which provides message verification by examining message signatures. A virtual transport, the messages are transfered between peers using some other message transport.


Nested Class Summary
 class CbJxTransport.CbJxInputFilter
          this class filters incoming messages.
 class CbJxTransport.CbJxOutputFilter
          this class filters all outgoing messages that are not sent with messengers.
 
Field Summary
(package private) static String CBJX_MSG_BODY
          the name of the cbjx body element
(package private) static String CBJX_MSG_INFO
          the name of the cbjx crypto element
static String CBJX_MSG_NS
          the name of the cbjx valid element
(package private) static String CBJX_MSG_SIG
          the name of the cbjx body element
(package private) static String cbjxProtocolName
          the cbjx protocol name
(package private) static String cbjxServiceName
          the cbjx service name
(package private)  EndpointService endpoint
          the endpoint service in my group
(package private)  PeerGroup group
          the peer group to which this module belongs
(package private) static EndpointAddress localPeerAddr
          the endpoint address of this peer
(package private) static PeerID localPeerID
          the local peer ID
(package private)  PSEMembershipService membership
          the membership service in my group
 
Fields inherited from interface net.jxta.platform.Module
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK
 
Constructor Summary
CbJxTransport()
          Default constructor
 
Method Summary
 Message addCryptoInfo(Message submessage, EndpointAddress destAddress)
          add the CryptoInfo into the message
 boolean allowsRouting()
          
 Message checkCryptoInfo(Message message, MessageElement cryptoElement, CbJxMessageInfo cryptoInfo)
           
 EndpointService getEndpointService()
          
 Messenger getMessenger(EndpointAddress dest, Object hintIgnored)
          
 String getProtocolName()
          
 EndpointAddress getPublicAddress()
          
 Iterator getPublicAddresses()
          
 void init(PeerGroup group, ID assignedID, Advertisement impl)
          
 boolean isConnectionOriented()
          
 boolean isPropagateEnabled()
          (@inheritdoc}
 boolean isPropagationSupported()
          (@inheritdoc}
 boolean ping(EndpointAddress addr)
          
 void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr)
          
 void propagate(Message msg, String serviceName, String serviceParams, String prunePeer)
          
 int startApp(String[] arg)
          
 void stopApp()
          
 Object transportControl(Object operation, Object value)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CBJX_MSG_NS

public static final String CBJX_MSG_NS
the name of the cbjx valid element

See Also:
Constant Field Values

CBJX_MSG_INFO

static final String CBJX_MSG_INFO
the name of the cbjx crypto element

See Also:
Constant Field Values

CBJX_MSG_BODY

static final String CBJX_MSG_BODY
the name of the cbjx body element

See Also:
Constant Field Values

CBJX_MSG_SIG

static final String CBJX_MSG_SIG
the name of the cbjx body element

See Also:
Constant Field Values

cbjxProtocolName

static final String cbjxProtocolName
the cbjx protocol name

See Also:
Constant Field Values

cbjxServiceName

static final String cbjxServiceName
the cbjx service name

See Also:
Constant Field Values

localPeerID

static PeerID localPeerID
the local peer ID


localPeerAddr

static EndpointAddress localPeerAddr
the endpoint address of this peer


group

PeerGroup group
the peer group to which this module belongs


endpoint

EndpointService endpoint
the endpoint service in my group


membership

PSEMembershipService membership
the membership service in my group

Constructor Detail

CbJxTransport

public CbJxTransport()
Default constructor

Method Detail

init

public void init(PeerGroup group,
                 ID assignedID,
                 Advertisement impl)
          throws PeerGroupException

Specified by:
init in interface Module
Throws:
PeerGroupException

startApp

public int startApp(String[] arg)

Specified by:
startApp in interface Module

stopApp

public void stopApp()

Specified by:
stopApp in interface Module

getPublicAddress

public EndpointAddress getPublicAddress()

Specified by:
getPublicAddress in interface MessageSender

isConnectionOriented

public boolean isConnectionOriented()

Specified by:
isConnectionOriented in interface MessageSender

allowsRouting

public boolean allowsRouting()

Specified by:
allowsRouting in interface MessageSender

getEndpointService

public EndpointService getEndpointService()

Specified by:
getEndpointService in interface MessageTransport

transportControl

public Object transportControl(Object operation,
                               Object value)

Specified by:
transportControl in interface MessageTransport

getPublicAddresses

public Iterator getPublicAddresses()

Specified by:
getPublicAddresses in interface MessageReceiver

getProtocolName

public String getProtocolName()

Specified by:
getProtocolName in interface MessageTransport

getMessenger

public Messenger getMessenger(EndpointAddress dest,
                              Object hintIgnored)

Specified by:
getMessenger in interface MessageSender

isPropagateEnabled

public boolean isPropagateEnabled()
(@inheritdoc}

Specified by:
isPropagateEnabled in interface MessageSender

isPropagationSupported

public boolean isPropagationSupported()
(@inheritdoc}

Specified by:
isPropagationSupported in interface MessageSender

propagate

public void propagate(Message msg,
                      String serviceName,
                      String serviceParams,
                      String prunePeer)
               throws IOException

Specified by:
propagate in interface MessageSender
Throws:
IOException

ping

public boolean ping(EndpointAddress addr)

Specified by:
ping in interface MessageSender

processIncomingMessage

public void processIncomingMessage(Message message,
                                   EndpointAddress srcAddr,
                                   EndpointAddress dstAddr)

Specified by:
processIncomingMessage in interface EndpointListener

addCryptoInfo

public Message addCryptoInfo(Message submessage,
                             EndpointAddress destAddress)
                      throws IOException
add the CryptoInfo into the message

Parameters:
submessage - the message
destAddress - the destination
Returns:
Message the message with the CbJxMessageInfo added
Throws:
IOException

checkCryptoInfo

public Message checkCryptoInfo(Message message,
                               MessageElement cryptoElement,
                               CbJxMessageInfo cryptoInfo)

JXTA J2SE