org.dicom4j.network.dimse.services
Interface DimseService

All Known Implementing Classes:
BaseDimseService, CFindSCP, CMoveSCP, CQuerySCP, CStoreSCP, ThreadedDimseService, VerificationSCPService

public interface DimseService

Base class to implement a DimseService.


The life cycle of a service is managed by 2 classes
DimseServicesManager is in charge to Bind/Unbind a service (like a ServerSocket) for a Specific MessageID.
Starting a service means handle all messages with the same ID from ONE association

DimseServicesManager is in charge to Creates/Dispose service.
the service manager allow services to be managed by a pool, an EJB, or anything else without changing the DimseServiceBroker

Since:
0.0.0
Author:
Laurent Lecomte

Method Summary
 void associationAborted(Association aAssociation, AssociateAbort aAbort)
           
 void bind(int aMessageID, Association aAssociation)
          Bind a service
 DimseServiceConfiguration getConfiguration()
          get the DimseServiceConfiguration
 int getMessageID()
          Return the Message ID
 String getName()
          Return the name of the Service
 void handleMessage(byte aPresentationContextID, AbstractDimseMessage aMessage)
          send a mesage
 boolean isBinded()
          Return true is the service is currently binded
 boolean isBinded(Association aAssociation)
           
 boolean isFinished()
          Return true if the service has finish his work, and can be unBind (should not receive messages anymore)
 void setConfiguration(DimseServiceConfiguration aConfiguration)
          set the DimseServiceConfiguration
 void unBind()
          Unbind the service, called when the service said isFinished
 

Method Detail

associationAborted

void associationAborted(Association aAssociation,
                        AssociateAbort aAbort)
                        throws Exception
Throws:
Exception

bind

void bind(int aMessageID,
          Association aAssociation)
Bind a service

Parameters:
aMessageID - the message ID
aAssociation - the Association

getConfiguration

DimseServiceConfiguration getConfiguration()
get the DimseServiceConfiguration

Returns:
the Configuration

getMessageID

int getMessageID()
Return the Message ID

Returns:

getName

String getName()
Return the name of the Service

Returns:
the name

handleMessage

void handleMessage(byte aPresentationContextID,
                   AbstractDimseMessage aMessage)
                   throws Exception
send a mesage

Parameters:
aPresentationContextID - the PresentationContextID
aMessage - the DimseMessage
Throws:
Exception

isBinded

boolean isBinded()
Return true is the service is currently binded

Returns:
true if bind

isBinded

boolean isBinded(Association aAssociation)

isFinished

boolean isFinished()
Return true if the service has finish his work, and can be unBind (should not receive messages anymore)

Returns:
true if finished

setConfiguration

void setConfiguration(DimseServiceConfiguration aConfiguration)
set the DimseServiceConfiguration

Parameters:
aConfiguration - the Configuration

unBind

void unBind()
Unbind the service, called when the service said isFinished



Copyright © 2009 dicom4j. All Rights Reserved.