org.objectweb.david.libs.binding.orbs.echannel
Class EventChannelFactory
java.lang.Object
|
+--org.omg.CORBA.ORB
|
+--org.objectweb.david.libs.binding.orbs.ORBSingletonClass
|
+--org.objectweb.david.libs.binding.orbs.ORBClass
|
+--org.objectweb.david.libs.binding.orbs.echannel.EventChannelFactory
- All Implemented Interfaces:
- Constants, DavidMarshallerFactory, NamingContext
- public class EventChannelFactory
- extends ORBClass
- implements NamingContext
The EventChannelFactory service allows the construction of EventChannels
providing best-effort unreliable and unordered event dissemination. It
relies on the RTP protocol on top of IP multicast.
| Fields inherited from interface org.objectweb.david.libs.binding.orbs.Constants |
corba_object_id, corba_prefix, TC_any, TC_boolean, TC_char, TC_double, TC_float, TC_long, TC_longdouble, TC_longlong, TC_null, TC_Object, TC_octet, TC_Principal, TC_short, TC_string, tc_table, TC_TypeCode, TC_ulong, TC_ulonglong, TC_ushort, TC_void, TC_wchar, TC_wstring |
|
Method Summary |
void |
bindConsumer(EBinder.EId id,
Object consumer,
Object channel_proxy)
|
static void |
bindConsumer(Object consumer,
Object channel_proxy)
Binds a consumer object to the event channel represented by the
provided_proxy parameter. |
Identifier |
decode(byte[] data,
int offset,
int length)
Returns an identifier, decoded from a byte array portion. |
Identifier |
decode(UnMarshaller u)
Returns an identifier, decoded using an UnMarshaller; |
Identifier |
export(Object itf,
Context hints)
This operation has no meaning in this context: an InternalException is
always thrown. |
protected void |
initialize()
Initializes the EventChannelFactory. |
Object |
newEventChannel(String address,
int port,
String type)
Constructs and returns a new EventChannel.
|
| Methods inherited from class org.objectweb.david.libs.binding.orbs.ORBClass |
connect, create_any, create_output_stream, disconnect, get_next_response, initialize, list_initial_services, newMarshaller, newUnMarshaller, object_to_string, perform_work, poll_next_response, resolve_initial_references, run, send_multiple_requests_deferred, send_multiple_requests_oneway, set_parameters, set_parameters, shutdown, string_to_object, work_pending |
| Methods inherited from class org.objectweb.david.libs.binding.orbs.ORBSingletonClass |
create_alias_tc, create_array_tc, create_context_list, create_enum_tc, create_environment, create_exception_list, create_exception_tc, create_interface_tc, create_list, create_named_value, create_operation_list, create_recursive_sequence_tc, create_recursive_tc, create_sequence_tc, create_string_tc, create_struct_tc, create_union_tc, create_value_box_tc, create_value_tc, create_wstring_tc, get_default_context, get_primitive_tc |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EventChannelFactory
public EventChannelFactory()
- Constructs a new instance of EventChannelFactory.
This method should not be called directly by an application: It is here only
to let EventChannelFactory be instanciated when one of the
org.omg.CORBA.ORB.init(...) methods is called.
initialize
protected void initialize()
throws JonathanException
- Initializes the EventChannelFactory.
- Overrides:
initialize in class ORBClass
- Throws:
JonathanException - if something goes wrong.
export
public Identifier export(Object itf,
Context hints)
- This operation has no meaning in this context: an InternalException is
always thrown.
- Specified by:
export in interface NamingContext
- Parameters:
itf - hints - - Returns:
- never.
newEventChannel
public Object newEventChannel(String address,
int port,
String type)
throws JonathanException
- Constructs and returns a new EventChannel.
type must the scoped name of the expected channel object type (not
the operations type). The channel type must not be "org.omg.CORBA.Object".
- Parameters:
address - the IP multicast address to useport - the port number to usetype - the type of the EventChannel- Returns:
- an EventChannel
- Throws:
JonathanException - thrown if something goes wrong
bindConsumer
public static void bindConsumer(Object consumer,
Object channel_proxy)
throws JonathanException
- Binds a consumer object to the event channel represented by the
provided_proxy parameter.
- Parameters:
consumer - a consumer object;channel_proxy - a channel proxy.- Throws:
JonathanException - if something goes wrong.
decode
public Identifier decode(byte[] data,
int offset,
int length)
throws JonathanException
- Returns an identifier, decoded from a byte array portion.
- Specified by:
decode in interface NamingContext
- Parameters:
data - the data to decode;offset - the starting point of the valid data in data;length - the number of relevant bytes in data;- Returns:
- a decoded Identifier.
- Throws:
JonathanException - if something goes wrong.
decode
public Identifier decode(UnMarshaller u)
throws JonathanException
- Returns an identifier, decoded using an UnMarshaller;
- Specified by:
decode in interface NamingContext
- Parameters:
u - an unmarshaller;- Returns:
- a decoded Identifier.
- Throws:
JonathanException - if something goes wrong.
bindConsumer
public void bindConsumer(EBinder.EId id,
Object consumer,
Object channel_proxy)
throws JonathanException